package com.java;

import com.java.Impl.OperationAdd;
import com.java.Impl.OperationMultiply;
import com.java.Impl.PerationSubstract;
import com.java.model.Context;

/**
 * Hello world!
 *
 */
public class StrategyPatternDemo
{
    public static void main( String[] args )
    {
        Context context=new Context(new OperationAdd());
        System.out.println("10+5="+context.executeStrategy(10,5));

        context=new Context(new OperationMultiply());
        System.out.println("10*5="+context.executeStrategy(10,5));

        context=new Context(new PerationSubstract());
        System.out.println("10-5="+context.executeStrategy(10,5));
    }
}
